{% load l10n material_form material_form_internal %}
{% part bound_field.field %}<div class="row radio-field">
    <div class="col s12">
        {% part field prefix %}{% endpart %}{% part field label %}<label for="{{ bound_field.id_for_label }}" class="{% part field add_label_class %}{{ form_label_class }}{% endpart %}">{{ bound_field.label }}</label>{% endpart %}
    </div>
    <div{% attrs bound_field 'group' %}
        id="id_{{ bound_field.html_name }}_container"
        class="col s12{% if field.required %} required{% endif %}{% if bound_field.errors %} has-error{% endif %}"
    {% endattrs %}>
        {% part field control %}
        {% for group, items in bound_field|select_options %}{% for choice, value, selected in items %}<div class="radio" id="id_{{ bound_field.html_name }}"><label>
            <input{% attrs bound_field 'widget' default field.widget.attrs %}
                id="id_{{ bound_field.html_name }}_{{ forloop.counter0 }}"
                name="{{ bound_field.html_name }}"
                type="radio"
                class="with-gap{% if bound_field.errors %} invalid{% endif %}"
                value="{{ value|unlocalize }}"
                {% if field.disabled %}disabled{% endif %}
                {% if selected %}checked{% endif %}
            {% endattrs %}/>
            <span{% attrs bound_field 'label' %}
                     for="id_{{ bound_field.html_name }}_{{ forloop.counter0 }}"
                     class="item-label"
            {% endattrs %}>{{ choice }}</span>
        </label></div>
        {% endfor %}{% endfor %}{% endpart %}{% part field help_text %}{% if field.help_text %}
        <div class="help-block">{{ bound_field.help_text|safe }}</div>
        {% endif %}{% part field errors %}
        {% if bound_field.errors %}
            {% include  'material/field_errors.html' %}
        {% endif %}{% endpart %}
        {% endpart %}{{ hidden_initial }}
    </div>
</div>{% endpart %}
